package com.system.part.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.system.employee.entity.Employee;
import com.system.part.entity.Part;


@org.springframework.stereotype.Repository
public interface PartRepository extends PagingAndSortingRepository<Part, Long>,JpaSpecificationExecutor<Part>{
	@Query("select e from Employee e join e.post ps join ps.part pr where pr.partId=:partId And ps.postName like '%%'" )
	public List<Employee> findEmployee(@Param("partId")Long partId);
}
